<template>
  <div class="hibernate-container">
    <!--    目录-->
    <div v-click-outside="clickContentOutside" class="content-holder">
      <v-btn
        @click="showContent = !showContent"
        density="compact"
        icon="fa-solid fa-bars"
        size="x-large"
        class="hibernate-content-icon"
      />
      <v-expand-transition>
        <div class="hibernate-content rounded-lg elevation-12" v-show="showContent">
          <div>
            <hibernate-content-list></hibernate-content-list>
          </div>
        </div>
      </v-expand-transition>
    </div>
    <div class="main-container">
      <router-view></router-view>
    </div>
  </div>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import HibernateContentList from "@/views/hibernate/hibernate-content-list.vue";

const showContent = ref(false)

const clickContentOutside = () => {
  showContent.value = false
}
</script>

<style scoped lang="scss">
.hibernate-container {
  position: relative;
  width: 100%;
  .content-holder{
    position: relative;
    z-index: 100;
  }

  .main-container{
    padding: 10px 70px;
  }

  .hibernate-content-icon {
    position: absolute;
    top: 10px;
    left: 10px;
  }

  .hibernate-content {
    width: 80vw;
    max-height: 50vh;
    position: absolute;
    background-color: rgb(153 153 153 / 80%);
    top: 10px;
    left: 60px;
    & > div {
      padding: 20px
    }
  }
}
</style>
